﻿using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;

namespace GT
{
    public static partial class Extensions
    {
        public static void ConvertImageFormat(this Image img, string SaveTo, System.Drawing.Imaging.ImageFormat NewFormat){
            //Image img = Image.FromFile(path);
            img.Save(SaveTo, NewFormat);
        }
        public static void RotateAndSaveImage(this Image img, string SaveTo, RotateFlipType type){
            //Image img = Image.FromFile(path);
            img.RotateFlip(type);
            img.Save(SaveTo);
            img.Dispose();
        }
        //public static void RotateAndSaveImage(this string path, RotateFlipType type){
        //    Image img = Image.FromFile(path);
        //    img.RotateFlip(type);
        //    img.Save(path);
        //    img.Dispose();
        //}
    }
}
